<template>
  <error-default>
    <van-button class="btn" block size="large" :color="color" @click="handleClick">返回首页</van-button>
  </error-default>
</template>

<script>
import { inject } from 'vue'
import { useRouter } from 'vue-router'
import { Button as VanButton } from 'vant'
import ErrorDefault from '@/components/ErrorDefault'
export default {
    name: 'NotFound',
    components: {
      VanButton,
      ErrorDefault
    },
    setup() {
      const color = inject('themeColor')
      const router = useRouter()
      const handleClick = () => {
        router.push({ path: '/' })
      }
      return {
        color,
        handleClick
      }
    }
}
</script>

<style lang="scss" scoped>
  .btn {
    margin-top: 20px;
  }
</style>